<!doctype html>
<html lang="en" data-framework="knockback">
	<head>
		<meta charset="utf-8">
		<title>Knockback.js • TodoMVC</title>
		<link rel="stylesheet" href="node_modules/todomvc-common/base.css">
		<link rel="stylesheet" href="node_modules/todomvc-app-css/index.css">
	</head>
	<body>
		<section class="todoapp" kb-inject="AppViewModel">
			<header class="header">
				<h1>todos</h1>
				<input class="new-todo" type="text" data-bind="value: title, valueUpdate: 'afterkeydown', event: {keyup: onAddTodo}" placeholder="What needs to be done?" autofocus>
			</header>
			<section class="main" data-bind="visible: todoStats().tasksExist">
				<input class="toggle-all" type="checkbox" data-bind="checked: toggleCompleted">
				<label for="toggle-all">Mark all as complete</label>
				<ul class="todo-list" data-bind="foreach: todos">
					<li data-bind="css: {completed: completed, editing: editing}">
						<div class="view" data-bind="event: {dblclick: onCheckEditBegin}">
							<input class="toggle" type="checkbox" data-bind="checked: completed" checked>
							<label data-bind="text: title"></label>
							<button class="destroy" data-bind="click: onDestroy"></button>
						</div>
						<input class="edit" type="text" data-bind="value: editTitle, event: {blur: onCheckEditEnd, keyup: onCheckEditEnd}">
					</li>
				</ul>
			</section>
			<footer class="footer" data-bind="visible: todoStats().tasksExist">
				<span class="todo-count">
					<strong data-bind="text: todoStats().remainingCount">0</strong>
					<span data-bind="text: getLabel(todoStats().remainingCount)"></span> left
				</span>
				<ul class="filters">
					<li>
						<a href="#/" data-bind="css: {selected: filterMode()==''}">All</a>
					</li>
					<li>
						<a href="#/active" data-bind="css: {selected: filterMode()=='active'}">Active</a>
					</li>
					<li>
						<a href="#/completed" data-bind="css: {selected: filterMode()=='completed'}">Completed</a>
					</li>
				</ul>
				<button class="clear-completed" data-bind="visible: todoStats().completedCount, click: onClearCompleted">Clear completed</button>
			</footer>
		</section>
		<footer class="info">
			<p>Double-click to edit a todo</p>
			<p>Created by <a href="https://github.com/kmalakoff">Kevin Malakoff</a>. <br/>
			Please try out the <a href="http://kmalakoff.github.com/knockback-todos-app/">enhanced version</a> <br/>
			with localization, priority colors, and lazy loading <br/>
			to see just how dynamic <a href="https://github.com/kmalakoff/knockback">Knockback.js</a> can be!</p>
			<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
		</footer>

		<!-- App Dependencies -->
		<script src="node_modules/todomvc-common/base.js"></script>
		<script src="node_modules/jquery/dist/jquery.js"></script>
		<script src="node_modules/underscore/underscore.js"></script>
		<script src="node_modules/backbone/backbone.js"></script>
		<script src="node_modules/knockout/build/output/knockout-latest.debug.js"></script>
		<script src="node_modules/knockback/knockback.js"></script>
		<script src="node_modules/backbone.localstorage/backbone.localStorage.js"></script>

		<!-- App and Components -->
		<script src="js/models/todo.js"></script>
		<script src="js/collections/todos.js"></script>
		<script src="js/viewmodels/todo.js"></script>
		<script src="js/viewmodels/app.js"></script>
	</body>
</html>
